{% extends 'base.html' %}

{% block title %}
    教师列表
{% endblock %}

{% block content %}
    <div class="main">
        <div class="row">
            <div class="col align-content-lg-start" >
                <button type="button" class="btn btn-outline-primary" style="float:right;margin-bottom: 5px;" onclick="javascript:window.location.href=''">新增教师</button>
            </div>
        </div>

        <div class="row">
            {% for teacher in teachers %}
            <div class="col-md-2">
                <div class="card mb-2">
                    <img src="{{ MEDIA_URL }}{{ teacher.css_image }}" alt="头像" class="bd-placeholder-img card-img-top" width="100%" height="150">
                    <div class="card-body" style="padding: 10px">
                        <p class="card-text">工号：{{ teacher.css_id }}</p>
                        <p class="card-text">姓名：{{ teacher.css_name }}</p>
                    </div>
                    <div class="btn-group">
                        <button type="button" class="btn btn-outline-danger" onclick="javascript:window.location.href='/users/user_delete/{{ teacher.id }}'">删除</button>
                        <button type="button" class="btn btn-outline-primary" onclick="javascript:window.location.href=''">修改</button>
                    </div>
                </div>
            </div>
            {% endfor %}
        </div>
    </div>
{% endblock %}